const express=require('express')
const pool=require('../db')
const router=express.Router()
//接口  carlogin
router.get('/',(req,res)=>{
  console.log(req.query);
  pool.query('select * from car_user where username=? and password=?', [req.query.username, req.query.password],(err,r)=>{
    if(err){throw err}
    console.log(r);
    if(r.length){
    return  res.send({code: 200, data: r[0]});
    }else
    res.send({code: 50001})
  })
})

module.exports=router